﻿namespace LprMiddleWare.HangWang
{

    public partial class NativeConstants
    {

        /// HW_DATA_RECEIVER -> 
        /// Error generating expression: 值不能为空。
        ///参数名: node
        public const string HW_DATA_RECEIVER = "";
    }

    public enum tagHWRecvEventType
    {

        /// HWRECV_EVENT_LINK -> 1
        HWRECV_EVENT_LINK = 1,

        /// HWRECV_EVENT_BREAK -> 2
        HWRECV_EVENT_BREAK = 2,

        /// HWRECV_EVENT_EXCEPT -> 3
        HWRECV_EVENT_EXCEPT = 3,

        /// HWRECV_EVENT_DATA_T -> 4
        HWRECV_EVENT_DATA_T = 4,

        /// HWRECV_EVENT_DATA_V -> 5
        HWRECV_EVENT_DATA_V = 5,
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public struct tagHWRecvEvent
    {

        /// HWRecvEventType->tagHWRecvEventType
        public tagHWRecvEventType type;

        /// void*
        public System.IntPtr data;

        /// void*
        public System.IntPtr pUserParam;
    }

    /// Return Type: boolean
    ///event: HWRecvEvent->tagHWRecvEvent
    [System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.StdCall)]
    public delegate bool HWRECVCALLBACK(tagHWRecvEvent @event);

    public enum tagHWRecvExceptionType
    {

        /// HWRECV_EXCEPT_WARNING -> 0
        HWRECV_EXCEPT_WARNING = 0,

        /// HWRECV_EXCEPT_ERROR -> 1
        HWRECV_EXCEPT_ERROR = 1,
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public struct tagHWRecvException
    {

        /// HWRecvExceptionType->tagHWRecvExceptionType
        public tagHWRecvExceptionType type;

        /// WCHAR*
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPWStr)]
        public string szInfo;
    }

    public enum tagHWRecvDeviceType
    {

        /// HWRECV_DEVICE_OTHER -> 0
        HWRECV_DEVICE_OTHER = 0,

        /// HWRECV_DEVICE_HEPC -> 1
        HWRECV_DEVICE_HEPC = 1,

        /// HWRECV_DEVICE_HPSC -> 2
        HWRECV_DEVICE_HPSC = 2,

        /// HWRECV_DEVICE_TRANSFER -> 3
        HWRECV_DEVICE_TRANSFER = 3,

        /// HWRECV_DEVICE_JOINT -> 4
        HWRECV_DEVICE_JOINT = 4,

        /// HWRECV_DEVICE_RECORDER -> 5
        HWRECV_DEVICE_RECORDER = 5,
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
    public struct tagHWRecvDevice
    {

        /// unsigned int
        public uint ip;

        /// HWRecvDeviceType->tagHWRecvDeviceType
        public tagHWRecvDeviceType type;

        /// WCHAR[32]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 32)]
        public string szName;
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public struct tagHWRecvDeviceStatus
    {

        /// HWRecvDevice*
        public System.IntPtr buf;

        /// unsigned int
        public uint num;
    }

    public enum tagHWRecvTimeType
    {

        /// HWRECV_TIME_REAL -> 0
        HWRECV_TIME_REAL = 0,

        /// HWRECV_TIME_OLD -> 1
        HWRECV_TIME_OLD = 1,
    }

    public enum tagHWRecvDataTypeT
    {

        /// HWRECV_DATA_EP -> 0
        HWRECV_DATA_EP = 0,

        /// HWRECV_DATA_PS -> 1
        HWRECV_DATA_PS = 1,

        /// HWRECV_DATA_HEP -> 2
        HWRECV_DATA_HEP = 2,

        /// HWRECV_DATA_HPS -> 3
        HWRECV_DATA_HPS = 3,

        /// HWRECV_DATA_MEP -> 4
        HWRECV_DATA_MEP = 4,

        /// HWRECV_DATA_HMEP -> 5
        HWRECV_DATA_HMEP = 5,
    }

    public enum tagHWRecvCarType
    {

        /// HWRECV_CAR_OTHER -> 0
        HWRECV_CAR_OTHER = 0,

        /// HWRECV_CAR_SMALL -> 1
        HWRECV_CAR_SMALL = 1,

        /// HWRECV_CAR_LARGE -> 2
        HWRECV_CAR_LARGE = 2,
    }

    public enum tagHWRecvColorPlate
    {

        /// HWRECV_COLOR_P_OTHER -> 0
        HWRECV_COLOR_P_OTHER = 0,

        /// HWRECV_COLOR_P_WHITE -> 1
        HWRECV_COLOR_P_WHITE = 1,

        /// HWRECV_COLOR_P_YELLOW -> 2
        HWRECV_COLOR_P_YELLOW = 2,

        /// HWRECV_COLOR_P_BLUE -> 3
        HWRECV_COLOR_P_BLUE = 3,

        /// HWRECV_COLOR_P_BLACK -> 4
        HWRECV_COLOR_P_BLACK = 4,

        /// HWRECV_COLOR_P_GREEN -> 5
        HWRECV_COLOR_P_GREEN = 5,
    }

    public enum tagHWRecvColorCar
    {

        /// HWRECV_COLOR_C_OTHER -> 0
        HWRECV_COLOR_C_OTHER = 0,

        /// HWRECV_COLOR_C_RED -> 1
        HWRECV_COLOR_C_RED = 1,

        /// HWRECV_COLOR_C_YELLOW -> 2
        HWRECV_COLOR_C_YELLOW = 2,

        /// HWRECV_COLOR_C_BLUE -> 3
        HWRECV_COLOR_C_BLUE = 3,

        /// HWRECV_COLOR_C_GREEN -> 4
        HWRECV_COLOR_C_GREEN = 4,

        /// HWRECV_COLOR_C_WHITE -> 5
        HWRECV_COLOR_C_WHITE = 5,

        /// HWRECV_COLOR_C_BLACK -> 6
        HWRECV_COLOR_C_BLACK = 6,
    }

    public enum tagHWRecvPhotoType
    {

        /// HWRECV_PHOTO_T_VIEW -> 0
        HWRECV_PHOTO_T_VIEW = 0,

        /// HWRECV_PHOTO_T_SAME_FEATURE -> 1
        HWRECV_PHOTO_T_SAME_FEATURE = 1,

        /// HWRECV_PHOTO_T_OTHER_FEATURE -> 2
        HWRECV_PHOTO_T_OTHER_FEATURE = 2,
    }

    public enum tagHWRecvPhotoFix
    {

        /// HWRECV_PHOTO_F_NORMAL -> 0
        HWRECV_PHOTO_F_NORMAL = 0,

        /// HWRECV_PHOTO_F_RIGHT -> 1
        HWRECV_PHOTO_F_RIGHT = 1,

        /// HWRECV_PHOTO_F_LEFT -> 2
        HWRECV_PHOTO_F_LEFT = 2,
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
    public struct tagHWRecvDataT
    {

        /// HWRecvDataTypeT->tagHWRecvDataTypeT
        public tagHWRecvDataTypeT typeData;

        /// HWRecvTimeType->tagHWRecvTimeType
        public tagHWRecvTimeType typeTime;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bRecognise;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bCoverText;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bDown2Top;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bRushRed;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bHeadTail;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bWrongWay;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bParking;

        /// BOOL->int
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.Bool)]
        public bool bPressLine;

        /// WCHAR[32]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 32)]
        public string szName;

        /// unsigned short
        public ushort sDrivewayNo;

        /// WCHAR[16]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 16)]
        public string szPlate;

        /// HWRecvColorPlate->tagHWRecvColorPlate
        public tagHWRecvColorPlate colorPlate;

        /// HWRecvCarType->tagHWRecvCarType
        public tagHWRecvCarType carType;

        /// unsigned short
        public ushort sCarLen;

        /// unsigned short
        public ushort sRed;

        /// unsigned short
        public ushort sSpeed;

        /// SYSTEMTIME->_SYSTEMTIME
        public SYSTEMTIME timePass;

        /// char[15]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = System.Runtime.InteropServices.UnmanagedType.I1)]
        public byte[] machine;

        /// unsigned int
        public uint dwLenFeature;

        /// unsigned char*
        public System.IntPtr pPicFeature;

        /// unsigned int
        public uint dwLenPlate;

        /// unsigned char*
        public System.IntPtr pPicPlate;

        /// unsigned int
        public uint dwLenExt1;

        /// unsigned char*
        public System.IntPtr pPicExt1;

        /// unsigned int
        public uint dwLenExt2;

        /// unsigned char*
        public System.IntPtr pPicExt2;

        /// unsigned int
        public uint dwLenExt3;

        /// unsigned char*
        public System.IntPtr pPicExt3;

        /// HWRecvColorCar->tagHWRecvColorCar
        public tagHWRecvColorCar colorCar;

        /// int
        public int lTimeFeature;

        /// int
        public int lTimePlate;

        /// int
        public int lTimeExt1;

        /// int
        public int lTimeExt2;

        /// int
        public int lTimeExt3;

        /// HWRecvPhotoType->tagHWRecvPhotoType
        public tagHWRecvPhotoType typeExt1;

        /// HWRecvPhotoType->tagHWRecvPhotoType
        public tagHWRecvPhotoType typeExt2;

        /// HWRecvPhotoType->tagHWRecvPhotoType
        public tagHWRecvPhotoType typeExt3;

        /// HWRecvPhotoFix->tagHWRecvPhotoFix
        public tagHWRecvPhotoFix fixFeature;

        /// HWRecvPhotoFix->tagHWRecvPhotoFix
        public tagHWRecvPhotoFix fixExt1;

        /// HWRecvPhotoFix->tagHWRecvPhotoFix
        public tagHWRecvPhotoFix fixExt2;

        /// HWRecvPhotoFix->tagHWRecvPhotoFix
        public tagHWRecvPhotoFix fixExt3;

        /// WCHAR[16]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 16)]
        public string szPlate2;

        /// HWRecvColorPlate->tagHWRecvColorPlate
        public tagHWRecvColorPlate colorPlate2;

        /// WCHAR[16]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 16)]
        public string szCarLogo;

        /// unsigned int[34]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValArray, SizeConst = 34, ArraySubType = System.Runtime.InteropServices.UnmanagedType.U4)]
        public uint[] reserved;
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
    public struct tagHWRecvDataV
    {

        /// WCHAR[32]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 32)]
        public string szName;

        /// unsigned short
        public ushort sVideoNo;

        /// SYSTEMTIME->_SYSTEMTIME
        public SYSTEMTIME timeBegin;

        /// SYSTEMTIME->_SYSTEMTIME
        public SYSTEMTIME timeEnd;

        /// unsigned char*
        public System.IntPtr pRecord;

        /// unsigned int
        public uint dwLen;
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Unicode)]
    public struct tagHWRecvCheck
    {

        /// WCHAR[32]
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 32)]
        public string szName;

        /// boolean
        public bool bAllow;
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public struct tagHWRecvCheckList
    {

        /// HWRecvCheck*
        public System.IntPtr check;

        /// unsigned int
        public uint num;

        /// boolean
        [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.I1)]
        public bool bAllowOther;
    }

    [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
    public struct tagHWRecvParam
    {

        /// unsigned short
        public ushort port;

        /// HWRecvCheckList->tagHWRecvCheckList
        public tagHWRecvCheckList checklist;

        /// HWRECVCALLBACK
        public HWRECVCALLBACK pCallBack;

        /// void*
        public System.IntPtr pUserParam;
    }

    public enum tagHWRecvRet
    {

        /// HWRECV_RET_OK -> 0
        HWRECV_RET_OK = 0,

        /// HWRECV_NO_CALLBACK -> 1
        HWRECV_NO_CALLBACK = 1,

        /// HWRECV_IOCP_FAIL -> 2
        HWRECV_IOCP_FAIL = 2,

        /// HWRECV_LIB_FAIL -> 3
        HWRECV_LIB_FAIL = 3,

        /// HWRECV_LOAD_FAIL -> 4
        HWRECV_LOAD_FAIL = 4,

        /// HWRECV_IOCP_BIND_FAIL -> 5
        HWRECV_IOCP_BIND_FAIL = 5,

        /// HWRECV_ADDR_BIND_FAIL -> 6
        HWRECV_ADDR_BIND_FAIL = 6,

        /// HWRECV_NO_INIT -> 7
        HWRECV_NO_INIT = 7,
    }


    public partial class NativeMethods
    {

        /// Return Type: HWRecvRet->tagHWRecvRet
        ///param: HWRecvParam->tagHWRecvParam
        [System.Runtime.InteropServices.DllImportAttribute("HWDataReceiver", EntryPoint = "HWDataRecvInit", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern tagHWRecvRet HWDataRecvInit(tagHWRecvParam param);


        /// Return Type: HWRecvRet->tagHWRecvRet
        [System.Runtime.InteropServices.DllImportAttribute("HWDataReceiver", EntryPoint = "HWDataRecvBegin", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern tagHWRecvRet HWDataRecvBegin();


        /// Return Type: void
        ///bPause: boolean
        [System.Runtime.InteropServices.DllImportAttribute("HWDataReceiver", EntryPoint = "HWDataRecvPause", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern void HWDataRecvPause([System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.I1)] bool bPause);


        /// Return Type: HWRecvDeviceStatus->tagHWRecvDeviceStatus
        [System.Runtime.InteropServices.DllImportAttribute("HWDataReceiver", EntryPoint = "HWDataRecvDeviceStatus", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern tagHWRecvDeviceStatus HWDataRecvDeviceStatus();


        /// Return Type: void
        [System.Runtime.InteropServices.DllImportAttribute("HWDataReceiver", EntryPoint = "HWDataRecvClose", CallingConvention = System.Runtime.InteropServices.CallingConvention.StdCall)]
        public static extern void HWDataRecvClose();

    }

}
